Palantir shares are trading higher after the company reported strong Q1 results and said it expects to remain profitable each quarter through the end of the year.